
import java.io.*;
import java.lang.*;
import java.util.*;

/**
 *
 * @author SumuduSe
 */
//handle input parameters and get the marking scheme
class HandleInput{

	private String theScheme=null;
	private String studentID=null;
	private String subjectID=null;
    private String assignmentID=null;

	public void HandleInput(){
		try{

			//UserParameters inputPara= new UserParameters();

    		BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    		while (System.in.available() > 0) //check enter
                	System.in.read(); //flush the buffer
                System.out.println("Enter Subject Id,Assignment Name & Student Id with spaces");
     			String sentence=inFromUser.readLine(); // wait for user input
     			String [] inParameter= sentence.split("\\s"); //split out 3 parameters


     			//whether 3 parameters has been entered?
     			if (inParameter.length==3)
     			{
     				subjectID=inParameter[0].toString();
     				assignmentID=inParameter[1].toString();
     				studentID=inParameter[2].toString();

     				 MarkingScheme scheme= new MarkingScheme();
     				 theScheme=scheme.getMarkingScheme(subjectID,assignmentID);
                     
     			}//end if
     			else
     			{
     				System.out.println("Invalid Parameter");
                    
     			}


		}catch(IOException e){
			System.out.println("Invalid Arguments");
            
		}
	}// end public void HandleInput

	public String gettheScheme(){
		return theScheme;
	}
    public void SetStudentID(String studID)
    {
        studentID = studID;
    }

	public String getStudentID(){
		return studentID;
	}

    public void SetSubjectID(String subjID)
    {
        subjectID = subjID;
    }
	public String getSubjectID(){
		return subjectID;
	}

    public void SetAssignmentID(String assID)
    {
        assignmentID = assID;
    }
	public String getAssignmentID(){
		return assignmentID;
	}
}

